Returns the method by which space combat is resolved (sb_space_calculated, sb_space_arcade, sb_space_turn, sb_space_realtime).
Fleets() : boolean;
Are fleets allowed in this game?
Ship_classes() : boolean;
Are there different classes of starships? (Not including trade ships).
Ship_design() : boolean;
Can you design ships in the game?
Surface_combat() : integer;
Returns how ground combat is resolved (sb_ground_none, sb_ground_calculated, sb_ground_turn, sb_ground_realtime).
Terraforming() : boolean;
Do you need to terraform the planet?
Development() : boolean;
Do you need to develop the surface of the planet (build structures).
Minerals() : boolean;
Do minerals affect production?
Sector_size() : integer;
Returns the size of the game board (sb_small, sb_medium, sb_large, sb_huge).
Diplomacy() : boolean;
Is diplomacy possible?
Anomalies() : boolean;
Are there anomalies?
Num_players() : integer;
The total number of players in the game.
Num_AIs() : integer;
The number of AI’s playing, including itself.
-----------------------------------------------
AI Information commands:
My_race() : integer;
Returns you race.
Planets_owned() : integer;
Returns the number of planets that you currently own.
Total_output() : integer;
Returns your total output.
Min_weapon() : integer;
Avg_weapon() : integer;
Max_weapon() : integer;
Min_shields() : integer;
Avg_shields() : integer;
Max_shields() : integer;
Min_move() : integer;
Avg_move() : integer;
Max_move() : integer;
Min_detect() : integer;
Avg_detect() : integer;
Max_detect() : integer;
Returns the minimum, average, and maximum tech levels of your empire.
-----------------------------------------------
Fleet commands:
First_fleet(race : integer) : fleet;
Returns the first ship in a fleet for a race. If race is -1 then this function returns the first fleet for all races. It only returns fleets that are visible to you.
Note: The value of fleet will vary from turn to turn for the same fleet(because fleet are created and destroyed), therefore, don't use fleets as a persistent value. If you want to keep track of a fleet, add an attachment to mark the fleet.
Returns the next fleet of the race. If race is -1 then this function returns the next fleet for all races. It only returns fleets that are visible to you. Note: See First_fleet for information about the persistence of the fleet value.
Can_scan_fleet(current : fleet) : boolean;
Returns true if you can scan the fleet.
Get_fleet_x(current : fleet) : integer;
Get_fleet_y(current : fleet) : integer;
Returns the location of a fleet.
Fleet_dist(current : fleet) : integer;
Returns how many movement points a fleet has left.
Set_destination(current : fleet; x : integer; y : integer) : integer;
This function will set a fleets destination. It returns an estimate of the number of turns until the destination will be reached.
Num_path_points(current : fleet) : integer;
Returns the number of points in the fleet’s path.
Path_add_hex(current : fleet; slot : integer; x : integer; y : integer) : boolean;
Adds a hex point to the path.
Path_add_planet(current : fleet; slot : integer; x : integer; y : integer) : boolean;
Set the state of the path/planet interaction. For example, whether the fleet will drop off colonist when it reaches the planet. The functions return false if the set command fails.
Returns the fleet whose move it is(in the Each fleet situation).
Move_fleet_angle(angle : integer) : boolean;
This function will move the current fleet on hex in the direction specified by angle. Angle varies from 0 to 5, with 0 being up, and proceeding clockwise. It returns whether it succeeded or not.
Follow_dest() : integer;
This function will make the fleet move toward it’s destination. It returns the number of movement points it has left.
Follow_path() : integer;
This function will make the fleet follow it’s path. It returns the number of movement points it has left if it completes the path(and the path doesn’t loop).
Skip() : none;
This function tells the fleet to wait for the rest of it’s move, setting it’s movement left to 0.
-----------------------------------------------
Ship commands:
Note: Ship command will either return a -1 value, or have not effect on ships that are out of range.
Returns informaiton about a specific ship in a fleet. Namely, the weapon, shield, current shield level, movement, detection, class and generation information.
This function will have a ship colonize a hex. It returns false if it the ship cannot land.
-----------------------------------------------
Bombard/defense commands:
Fire_planetary_defense(target : integer) : none;
This function fires the planetary defense at one of the ships in orbit. If you pass this function a non-valid target number, it does not fire.
Bombard_planet(target : hex) : none;
This function makes a orbital ship bombard a specific hex on the planet. Hex values can range from 0 to 127. If you pass this function a non-valid hex, then the ship skips it’s firing turn.
-----------------------------------------------
Surface commands:
Hex_shielded(hex : integer) : boolean;
This function returns whether a hex is shielded or not.
Hex_structure(hex : integer) : structure;
This function returns the structure contained in the hex. If there is not one it returns nil.
Nearest_free_hex(hex : integer) : integer;
This function returns the nearest hex that may be landed on. This hex has no structure and is not shielded.
Hex_squad(hex : integer) : squad;
This function returns the squad in the hex or nil if there is no squad present.
-----------------------------------------------
Deployment commands:
Num_unit_type(type : integer) : integer;
This function returns the number of units that you have in the cargo holds of your fleet(for all the active ship) or in the current barracks.
This function allows you to set whether a ship will deploy troops or not.
Add_unit_to_squad(type : integer) : boolean;
This function adds a unit to the squad from the ships in orbit or from the current barracks.
Deploy_squad() : boolean;
This function deploys a squad from a barracks.
Deploy_drop_ship(hex : integer) : boolean;
This function deploys a drop ship carrying a squad to a specific hex. It returns true or false depending on whether you can deploy the drop ship there.
-----------------------------------------------
Squad commands:
This_squad() : squad;
Returns the current squad.
Squad_race(current : squad) : integer;
Returns the race of the current squad.
Num_units(current : squad) : integer;
Returns the number of units in the squad.
Unit_type(current : squad; unit : integer) : integer;
Returns the type of unit. -1 if you pass an invalid unit number.
Planet_distance(from : integer; to : integer) : integer;
This function returns the distance between two points on the planet.
First_squad(race : integer) : squad;
This function returns the first squad on the planet of a certain race. It returns nil if there is no squads of that race on the planet.
Next_squad(cur : squad; race : integer) : squad;
This function returns the next squad on the planet of the race.
Move_squad(hex : integer) : boolean;
This function moves the active units of the squad toward the hex. Leaving behind the inactive units. If you move into another squad of your race, then the active units attempt to join the squad. If you join two squads that add up to more then eight units then nothing happens and Move_squad returns false.
Active_unit(unit : integer; state : boolean) : none;
This function allows you to set which units are active and which are not.
-----------------------------------------------
Ground combat commands:
Enemy_ground_race() : integer;
Returns the race of your ground opponent.
This_ground() : ground;
Returns the current ground unit.
First_ground(friendly : boolean) : ground;
Returns the first ground unit, friendly of enemy.
Next_ground(current : ground) : ground;
Returns the next ground unit, same as the current.
Returns the current x and y location of the ground unit. This value varies from 0,0 to 2400, 1632.
Set_ground_dest(current : ground; x : integer; y : integer) : boolean;
Sets the destination of the unit. Returns false if you do not own the unit. This will remove the units target. It also removes all current way points.
Add_ground_dest(current : ground; x : integer; y : integer) : boolean;
Adds a destination to the current ground unit’s way-point list. Returns false if you do not own this unit. If there is no destination set for the unit then this will be the first destination.
Get_ground_dest_x(current : ground) : integer;
Get_ground_dest_y(current : ground) : integer;
Returns the destination of the current ground unit.
-----------------------------------------------
Planet commands:
First_planet(race : integer) : planet;
Returns the first planet of the race. If race is -1 then it returns the first planet regardless of race.
Sets the manifest of the ship being constructed. Returns false if you are setting the manifest to hold more then the ship can.
Stardock_cur_space(current : planet) : integer;
Returns the current space available in the ship being constructed.
Stardock_max_space(current : planet) : integer;
Returns the maximum space available in the ship being constructed.
-----------------------------------------------
Space combat commands:
Enemy_space_race() : integer;
Returns the race of the enemy ship, or -1 if it is a neutral race.
This_ship() : ship;
Returns the current ship;
First_ship(friendly : boolean) : ship;
Next_ship(current : ship) : ship;
Use this functions to go therough all of the enemy or friendly ships in space combat.
Space_race(current : ship) : integer;
Space_class(current : ship) : integer;
Space_gen(current : ship) : integer;
These functions return information about a ship. By accessing these functions you can then use the system functions to find out about the ship systems.
System_damage(current : ship; system : integer) : integer;
This function returns the damage to system on a ship. If it fails it returns -1.
System_charges(current : ship; system : integer) : integer;
This function returns the number of charges left in a system.
Set_fire_status(current : ship; fire : integer; active : boolean) : boolean;
Get_fire_status(current : ship; fire : integer) : boolean;
This function sets the fire system activation levels. It returns false if it fails.
Space_weapon(current : ship) : integer;
Space_shields(current : ship) : integer;
Space_move(current : ship) : integer;
Space_detect(current : ship) : integer;
These functions return the tech level of the ship.
Space_fore_shield(current : ship) : integer;
Space_aft_shield(current : ship) : integer;
Space_starboard_shield(current : ship) : integer;
Space_port_shield(current : ship) : integer;
Space_fore_armor(current : ship) : integer;
Space_aft_armor(current : ship) : integer;
Space_starboard_armor(current : ship) : integer;
Space_port_armor(current : ship) : integer;
These functions return the shields and armor of the ship.
Set_space_dest(current : ship; x : integer; y : integer) : boolean;
This function sets the ships destination. It returns false if it fails.
Add_space_dest(current : ship; x : integer; y : integer) : boolean;
This function adds a way point to the ships destination. It returns false if it fails.